
package controller;




import Utilities.DBConnection;
import bo.BUS_KhachHang;
import com.opensymphony.xwork2.ActionSupport;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.interceptor.ServletRequestAware;





public class XoaKhachHangAction extends ActionSupport implements ServletRequestAware{


    private HttpServletRequest request;

    public XoaKhachHangAction() {

    }



    public String execute() throws Exception {

        BUS_KhachHang busKH = new BUS_KhachHang();
        int MaKH = Integer.parseInt(request.getParameter("GiaTriTim"));
        boolean flag = busKH.XoaKhachHang(MaKH);
        if(flag == true)
        {
            return "success";
        }
        return "fail";

    }

    @Override
    public void setServletRequest(HttpServletRequest hsr) {
        request = hsr;
    }



}